This repository has been archived by the owner on Nov 8, 2018. It is now read-only.
forked from peacecorps/app-web-server
-
Notifications
You must be signed in to change notification settings - Fork 51
Moved tests for malaria-web app from automated-testing #365
Open
nfebe
wants to merge
4
commits into
systers:develop
Choose a base branch
from
nfebe:add-unit-tests-malaria-web
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Fenn-25 <[email protected]>
nfebe
changed the title
Moved malaria-web app from automated-testing
Moved tests for malaria-web app from automated-testing
Jul 8, 2018
nfebe
changed the title
Moved tests for malaria-web app from automated-testing
Moved tests for malaria-web app from automated-testing [In-Progress]
Jul 8, 2018
Signed-off-by: Fenn-25 <[email protected]>
Signed-off-by: Fenn-25 <[email protected]>
Signed-off-by: Fenn-25 <[email protected]>
nfebe
changed the title
Moved tests for malaria-web app from automated-testing [In-Progress]
Moved tests for malaria-web app from automated-testing
Jul 10, 2018
sara-02
reviewed
Jul 13, 2018
self.assertFalse(delete_post_by_id(999)) | ||
self.assertFalse(delete_post_by_id(999999)) | ||
|
||
def test_get_post_by_id(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fenn-cs I have a doubt here, won't the test_get_post_by_id
fail? Since test_delete_post_by_id
would have deleted the posts, which we are trying to fetch in the second test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I get it now :)
@sara-02 It won't because, the setup method is run before every is
followed. It means the db will re repopulated with setup data before the
functions runs. Hope its clearer now.
On 13 Jul 2018 7:38 a.m., "Sarah Masud" <[email protected]> wrote:
*@sara-02* commented on this pull request.
------------------------------
In malaria_web/tests.py
<#365 (comment)>:
+ def test_delete_post_by_id(self):
+
+ self.assertTrue(delete_post_by_id(self.post1.id))
+ self.assertTrue(delete_post_by_id(self.post2.id))
+ self.assertFalse(delete_post_by_id(-999999))
+ self.assertFalse(delete_post_by_id(-1))
+ self.assertFalse(delete_post_by_id(100))
+ self.assertFalse(delete_post_by_id(200))
+ self.assertFalse(delete_post_by_id(300))
+ self.assertFalse(delete_post_by_id(400))
+ self.assertFalse(delete_post_by_id(500))
+ self.assertFalse(delete_post_by_id(600))
+ self.assertFalse(delete_post_by_id(999))
+ self.assertFalse(delete_post_by_id(999999))
+
+ def test_get_post_by_id(self):
@fenn-cs <https://github.com/Fenn-CS> I have a doubt here, won't the
test_get_post_by_id fail? Since test_delete_post_by_id would have deleted
the posts, which we are trying to fetch in the second test.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#365 (review)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ANp4zytSTdtLb9iPTsV0MGSY7KlK00jVks5uGEBtgaJpZM4VEtb6>
.
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Fenn-25 [email protected]
Description
Moved unit tests from automated-testing/MACCTests2017/tests/unit/test_malaria_web.py to
tests.py
of malaria-web module.Fixes #364
Type of Change:
How Has This Been Tested?
Local run.
Checklist: